<%@ page import="com.gymjournal.Note; com.gymjournal.Gymnastic" %>



<div class="fieldcontain ${hasErrors(bean: gymnasticInstance, field: 'note', 'error')} ">
	<label for="note">
		<g:message code="gymnastic.note.label" default="Note" />
		
	</label>
    <g:textArea id="note" name="content" cols="40" rows="5" maxlength="255" />
	%{--<g:select id="note" name="note.id" from="${com.gymjournal.Note.list()}" optionKey="id" value="${gymnasticInstance?.note?.id}" class="many-to-one" noSelection="['null': '']"/>--}%
</div>

<div class="fieldcontain ${hasErrors(bean: gymnasticInstance, field: 'gymnasticType', 'error')} ">
	<label for="gymnasticType">
		<g:message code="gymnastic.gymnasticType.label" default="Gymnastic Type" />
		
	</label>
	<g:select id="gymnasticType" name="gymnasticType.id" from="${com.gymjournal.GymnasticType.list()}" optionKey="id" value="${gymnasticInstance?.gymnasticType?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: gymnasticInstance, field: 'customGymnasticType', 'error')} ">
	<label for="customGymnasticType">
		<g:message code="gymnastic.customGymnasticType.label" default="Custom Gymnastic Type" />
		
	</label>
	<g:textField name="customGymnasticType" value="${gymnasticInstance?.customGymnasticType}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: gymnasticInstance, field: 'gymSets', 'error')} required">
	<label for="gymSets">
		<g:message code="gymnastic.gymSets.label" default="Gym Sets" />
		<span class="required-indicator">*</span>
	</label>
	
<ul class="one-to-many">
<g:each in="${gymnasticInstance?.gymSets?}" var="g">
    <li><g:link controller="gymSet" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="gymSet" action="create" params="['gymnastic.id': gymnasticInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'gymSet.label', default: 'GymSet')])}</g:link>
</li>
</ul>

</div>

